package com.zhengxyou.jetpackdemo.room.entity;

import android.graphics.Bitmap;

import com.zhengxyou.jetpackdemo.room.typeConverter.Converters;

import java.util.Date;

import androidx.room.ColumnInfo;
import androidx.room.Embedded;
import androidx.room.Entity;
import androidx.room.Ignore;
import androidx.room.PrimaryKey;
import androidx.room.TypeConverters;

//@Entity(indices = {@Index(value = "first_name", unique = true)})
@Entity
public class User {
    @PrimaryKey(autoGenerate = true)
    public int id;

    @ColumnInfo(name = "first_name")
    public String firstName;

    @ColumnInfo(name = "last_name")
    public String lastName;
    public int age;
    @ColumnInfo(name = "card_id")
    public String cardId;
    public byte sex;
    @Embedded
    public Adress adress;
    @TypeConverters(value = {Converters.class})
    public Date birthday;
    @Ignore
    public Bitmap picture;
}
